import { request_get, request_post, request_ajax, request_user, request_isLogin } from '@/components/common/API/request'
import { config } from '@/components/common/API/config'
import store from '@/vuex/index'
import log from '@/components/common/log'
//查询题目列表
export const queryProblem = (data) => {
    const url = config.service.queryProblem
    return request_ajax(url, data, 'get', 'false').then((res) => {
        return res
    })
}
//查询问题详情
export const subProblem = (data) => {
    const url = config.service.subProblem
    return request_post(url, data).then((res) => {
        return res
    })
}
//查询问题详情
export const questionDetail = (data) => {
    const url = config.service.questionDetail
    return request_get(url, data).then((res) => {
        return res
    })
}
//查询回复
export const answerDetail = (data) => {
    const url = config.service.answerDetail
    return request_ajax(url, data,'get','false').then((res) => {
        return res
    })
}
//提交回复
export const subAnswer = (data) => {
    const url = config.service.subAnswer
    return request_post(url, data).then((res) => {
        return res
    })
}
//删除问题
export const deletProblem = (data) => {
    const url = config.service.deletProblem
    return request_post(url, data).then((res) => {
        return res
    })
}
//用户加入黑名单
export const joinBlacklist = (data) => {
    const url = config.service.joinBlacklist
    return request_post(url, data).then((res) => {
        return res
    })
}